import { network } from '@/utils';

import { basic } from '../../../../../config/Apis';

export async function queryDetail(params: any) {
  return network.get(basic.cabCellConf_slaveType, { params });
}

export async function queryNextCode() {
  return network.get(basic.cabCellConf_nextSlaveCode);
}

export async function operSaveOrUpdate(params: any) {
  const request = params.id
    ? network.put(basic.cabCellConf_slaveType, { data: params })
    : network.post(basic.cabCellConf_slaveType, { data: params });

  return request;
}
